How a Program Runs Internally in Java